package com.sxt.pro.rabbitmq;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.rabbitmq.client.Channel;

/**  

* @Description: mq消费者模拟接收消息(集成springboot)

* @author xinxiaokang  

* @date 2020年8月26日 下午4:31:24

*/
//@Component
public class Consumer02 {
	
	/** 采用注解@RabbitListener接收mq消息 **/
    //@RabbitListener(queues = {RabbitmqConfig.QUEUE_INFORM_EMAIL})
	@RabbitListener(queues = "#{rabbitmqConfig.QUEUE_INFORM_EMAIL}")
	public void send_email(String msg,Message message,Channel channel){
		System.out.println("receive message is:"+msg);
	}
}
